home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / TUTORC.ZIP / TUTHEADR.H < prev    next >
C/C++ Source or Header  |  1994-10-30  |  2KB  |  85 lines

  1. /* 
  2.   tutheadr.h 
  3.   10/30/94
  4.   Header file to go with files tut2.c, tut4.c, etc.
  5.   Translated into C, from Denthor's VGA Trainer, by
  6.   Steve Pinault, scp@ohm.att.com
  7.   Compiled with Microsoft Visual C++ 1.5 (Microsoft C 8.0)
  8.   To compile:
  9.   First compile the subroutines in tutsubs.c with the batch file 
  10.   cltutsub.bat
  11.   Then compile any of the tutor programs with the batch file
  12.   cltut.bat
  13.   Example: C:>cltutsub
  14.            C:>cltut tut2.c
  15. */
  16.  
  17. #include <stdio.h>
  18. #include <stdlib.h>
  19. #include <dos.h>
  20. #include <math.h>
  21. #include <conio.h>
  22. #include <graph.h>
  23. #include <bios.h>
  24. #include <string.h>
  25. #include <time.h>
  26.  
  27. #define VGA 0xa000
  28. #define PI (float) 3.14159
  29. #define TRUE 1
  30. #define FALSE 0
  31. #define RAND_MX1 (long)((long)RAND_MAX + (long)1)
  32.         // Note: need the outer parentheses because this expression
  33.         // is what is substituted, not the result!
  34.  
  35. struct Point
  36. {
  37.   float x;
  38.   float y;
  39.   float z;
  40. }; 
  41.  
  42. char  Virtual[(unsigned)64000];  // Virtual Screen.
  43. char  Virtual2[(unsigned)64000];  // Virtual Screen.
  44. char far* VirtPtr;
  45. char far* VirtPtr2;
  46. unsigned int Vaddr;
  47. unsigned int Vaddr2;
  48. char Pall[256][3];
  49. char Pall2[256][3];
  50.  
  51. void SetMCGA();
  52. void SetText();
  53. void WaitRetrace();
  54. void GetPal(char ColorNo, char* R, char* G, char* B);
  55. void Pal(char ColorNo, char R, char G, char B);
  56. void SetAllPal(char far* pal);
  57. void PutPixel(int X, int Y, char Color, int Where);
  58. void Line(int x1, int y1, int x2, int y2, unsigned char Color);
  59. void Line2(int x1, int y1, int x2, int y2, unsigned char Color, int where);
  60. void Funny_Line(int x1, int y1, int x2, int y2, int Where);
  61. void PalPlay();
  62. void rotatepal(char locpal[][3], int start, int end);
  63. void GrabPallette();
  64. void Blackout();
  65. void FadeUp();
  66. void FadeDown();
  67. void RestorePallette();
  68. void Cls(char Color, int Where);
  69. void Flip();
  70. void Flip2(int Source, int Dest);
  71. void randomize();
  72. int  random(int x);
  73. float rad(float theta);
  74. int round(float x);
  75. void SetUpVirtual();
  76. void Hline(int x1, int x2, int y, char col, int where);
  77. void PutPixel2(int x, int y, char col, int where);
  78. char GetPixel(int x, int y, int where);  
  79. void LoadCEL(char* FileName, char far* ScrPtr);
  80. void delay(int wait);
  81. void InitChain4(int Size);
  82. void C4PutPixel(int x, int y, char col, int Size);
  83. void Plane(char Which);
  84. void moveto(int x, int y, int Size);
  85.